import request from '@/utils/request';

// 个人首页
export async function queryPerson(query: { address: string | undefined }) {
  return request('GET', '/api/member/index', { query: { ...query } });
}
// 推荐地址
export async function queryShareAddress(query: { address: string | undefined }) {
  return request('GET', '/api/member/shares', { query: { ...query } });
}
// 资产明细
export async function queryDetail(query: { address: string | undefined; id: any }) {
  return request('GET', '/api/member/wallet/detail', { query: { ...query } });
}

// 兑换信息
export async function queryExchange(query: { address: string | undefined }) {
  return request('GET', '/api/wallet/swap/info', { query: { ...query } });
}

// 提币参数
export async function queryWithdraw(body: { walletId: number | undefined; amount: string | undefined; signature: string; address: string | undefined }) {
  return request('POST', '/api/wallet/withdraw', { body });
}

// 兑换
export async function querySwap(body: { signature: string, value: string, address: string | undefined }) {
  return request('POST', '/api/wallet/swap', { body });
}




